﻿package mortal.game.view.guildNew.activity
{
    import com.gengine.resource.*;
    import com.mui.containers.globalVariable.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import extend.language.*;
    import fl.data.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.guildNew.data.*;

    public class GuildNewActivePanel extends GSprite implements GuildNewPanelI
    {
        protected var _bg:ScaleBitmap;
        protected var _list:GTileList;
        protected var _titleBg:ScaleBitmap;
        protected var _tAname:GTextFiled;
        protected var _tRw:GTextFiled;
        protected var _tOpenTime:GTextFiled;
        protected var _tOprBt:GTextFiled;

        public function GuildNewActivePanel()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            LoaderHelp.addResCallBack(ResFileConst.guildNActive, this.onResLoad);
            return;
        }// end function

        private function onResLoad() : void
        {
            this._bg = UIFactory.bg(0, 0, 748, 475, this, ImagesConst.PanelBg);
            this._list = UIFactory.tileList(19, 25, 725, 445, this);
            this._list.direction = GBoxDirection.VERTICAL;
            this._list.verticalGap = 2;
            this._list.horizontalGap = 0;
            this._list.rowHeight = 75;
            this._list.columnWidth = 710;
            this._list.columnCount = 1;
            this._list.rowCount = 6;
            this._list.width = 725;
            this._list.setStyle("cellRenderer", GuildNewActiveCell);
            this._titleBg = UIFactory.bg(1, 2, 749, 25, this, ImagesConst.RegionTitleBg);
            this._tAname = UIFactory.gTextField("" + Language.getString(71416), 156, 2, 100, 20, this, GlobalStyle.textFormatPutong.setColor(16777215).setSize(13));
            this._tRw = UIFactory.gTextField("" + Language.getString(71417), 326, 2, 100, 20, this, GlobalStyle.textFormatPutong.setColor(16777215).setSize(13));
            this._tOpenTime = UIFactory.gTextField("" + Language.getString(71418), 481, 3, 100, 20, this, GlobalStyle.textFormatPutong.setColor(16777215));
            this._tOprBt = UIFactory.gTextField("" + Language.getString(71419), 617, 1, 100, 20, this, GlobalStyle.textFormatPutong.setColor(16777215).setSize(13));
            this._list.height = 445;
            this.update();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            LoaderHelp.removeResEvent(ResFileConst.guildNActive, this.onResLoad);
            this._bg = null;
            this._list = null;
            this._titleBg = null;
            this._tAname = null;
            this._tRw = null;
            this._tOpenTime = null;
            this._tOprBt = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function update() : void
        {
            if (this._list == null)
            {
                return;
            }
            var _loc_1:* = GuildNewUtil.getActiveArr();
            this._list.dataProvider = new DataProvider(_loc_1);
            this._list.drawNow();
            return;
        }// end function

    }
}
